package com.leff.cards.web.requests;

import com.leff.cards.data.AppState;
import com.leff.cards.util.Dictionary;
import com.leff.cards.web.WebRequest;

public class CreateGroupRequest extends WebRequest {

	public CreateGroupRequest(String groupName, long userId) {
		super(WebCommand.CREATE_GROUP);
		
		mParameters.put(Parameter.NAME, groupName);
		mParameters.put(Parameter.ID, String.valueOf(userId));
	}

	@Override
	protected void parseResultDictionary(Dictionary dict) {
		// There's no need to actually parse this message
		// We're here, so it's successful, so we just want to refresh our groups
		AppState.get().refreshGroups();
	}
}
